package com.mz.ozy.adapter;

import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mz.ozy.R;
import com.mz.ozy.bean.ShogBean;
import com.mz.ozy.utils.glideUtils.GlideUtils;

import java.util.List;

/**
 *
 */

public class ShogListAdapter extends BaseQuickAdapter<ShogBean.PageBean.PageItemsBean, BaseViewHolder> {

    public ShogListAdapter(List<ShogBean.PageBean.PageItemsBean> data) {
        super(R.layout.item_shog_list, data);

    }

    @Override
    protected void convert(BaseViewHolder helper, ShogBean.PageBean.PageItemsBean item) {
        ImageView imageView = helper.getView(R.id.image_one);
        ImageView start = helper.getView(R.id.start);
//        if (item.getSctype() == 0) {
//            start.setVisibility(View.GONE);
//        } else {
//            start.setVisibility(View.VISIBLE);
//        }
        GlideUtils.loadRoundImg(mContext, imageView, item.getImg1(), 5);
        helper.setText(R.id.tv_title, item.getTitle());
        //   helper.setText(R.id.tv_name, item.getIntroduction());
        helper.setText(R.id.tv_time, item.getCreated());

    }


}
